package ch6;

import java.util.Scanner;

public class CalcScore {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		double[][] s = new double[5][5];
		for (int i = 0; i < s.length; i++) {
			for (int j = 0; j < s[i].length; j++) {
				System.out.printf("请输入%d班第%d名同学的成绩：\n", i + 1, j + 1);

				s[i][j] = in.nextDouble();
			}
		}
		double total = 0;
		for (int i = 0; i < s.length; i++) {
			total = 0;
			for (int j = 0; j < s[i].length; j++) {
				total += s[i][j];
			}
			System.out.println((i + 1) + "班总成绩是：" + total);
		}
	}

}
